/**
 * 
 */
package org.x.starter4j.jetty.httpserver;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;

/**
 * @author huangyang@p-an.com 2013年11月6日
 */
public class DemoHttpServer
{
	public static void main(final String[] args) throws Exception
	{
		Server server = new Server();
		ServerConnector http = new ServerConnector(server);
		http.setHost("localhost");
		http.setPort(8080);
		http.setIdleTimeout(30000);
		server.addConnector(http);
		server.setHandler(new HelloHandler());
		server.start();
		server.join();
	}
}
